<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>

</body>
<script>

  function f1(){
    let name = "张三";
    var sex = "男";
    console.log(name);
    if (1 === 1){
      console.log(name)
      console.log(sex)
      //let age = 10;
      var score = 99;
    }
    console.log(score)//未超出函数作用域,正常
    // console.log(age)//超出let声明的作用域
  }

</script>
</html>
